package com.atguigu.gmall.cart.feign;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(name = "service-cart",path = "/cart")
public interface CartFeign {

    /**
     * 查询用户选中的购物车信息
     * @return
     */
    @GetMapping(value = "/getChooseCartInfoList/{userId}")
    public List<CartInfo> getChooseCartInfoList(@PathVariable(value = "userId")Long userId);

    /**
     * 删除购物车
     * @param userId
     * @param skuId
     * @return
     */
    @GetMapping(value = "/delCart/{userId}/{skuId}")
    public Result delCart(@PathVariable(value = "userId") Long userId, @PathVariable(value = "skuId") Long skuId);
}
